package com.varian.auth.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.varian.auth.model.dto.OAuth2AuthorizationInfoPageDTO;
import com.varian.auth.model.entity.OAuth2AuthorizationInfo;
import com.varian.auth.model.vo.OAuth2AuthorizationInfoItemVO;
import org.springframework.security.oauth2.server.authorization.OAuth2Authorization;
import org.springframework.security.oauth2.server.authorization.OAuth2TokenType;

/**
 * @author ben
 * @since 2024/6/30
 */
public interface IOAuth2AuthorizationInfoService extends IService<OAuth2AuthorizationInfo> {

    void save(OAuth2Authorization authorization);

    void remove(OAuth2Authorization authorization);

    OAuth2Authorization findById(String id);

    OAuth2Authorization findByToken(String token, OAuth2TokenType tokenType);

    Page<OAuth2AuthorizationInfoItemVO> page(OAuth2AuthorizationInfoPageDTO dto);
}
